<template>
  <el-popover placement="bottom" width="90" trigger="hover">
    <div>
      <div>
        <div style="margin-left:35px">
          <img src="../assets/img/吴彦祖圆头.png" width="80" height="80" />
        </div>
        <div style="font-size: small; margin-left: 15px">
          <div>尊贵的{{$store.state.clientName}}，您好</div>
        </div>
      </div>
      <el-button type="primary" plain @click="toOrderList">订单列表</el-button>
      <el-button type="primary" plain @click="exit">退出登录</el-button>
    </div>
    <el-button slot="reference">
      <img src="../assets/img/个人头像.png" width="25" height="25" id="img" />
    </el-button>
  </el-popover>
</template>
<script>

export default {
  data() {
    return {
      
    };
  },
  methods: {
    toOrderList() {
      this.$router.push("/OrderList");
    },
    exit() {
      this.$store.commit("savelogin", false);
      this.$store.commit("saveclientName", "");
      this.$store.commit("saveId", "");
      console.log('退出登录');
      location.reload();
    }
  }
};
</script>
<style scoped>
.el-button{
  margin-left: 25px;
  margin-top:10px;
}
</style>